package com.spittr.domain;

import java.util.Date;

/**
 * 吐槽内容对象类
 *
 * @author wben
 * @version v1.0
 */
public class Spittle {

	private final Long id;
	private final Spitter spitter;
	private final String message;
	private final Date postedTime;
	// 增加字段 ischecked，checker_id，check_time，修改构造方法，提供getter
	private final Boolean isChecked;
	private final Integer checkId;
	private final Date checkTime;

	/**
	 * Instantiates a new Spittle.
	 *
	 * @param id         the id
	 * @param spitter    the spitter
	 * @param message    the message
	 * @param postedTime the posted time
	 * @param isChecked  the is checked
	 * @param checkId    the check id
	 * @param checkTime  the check time
	 */
	public Spittle(Long id, Spitter spitter, String message, Date postedTime, Boolean isChecked, Integer checkId, Date checkTime) {
		this.id = id;
		this.spitter = spitter;
		this.message = message;
		this.postedTime = postedTime;
		this.isChecked = isChecked;
		this.checkId = checkId;
		this.checkTime = checkTime;
	}

	/**
	 * Gets checked.
	 *
	 * getter方法一定是get+属性首字母大写，因为外部调用时是按 属性名》首字母大写》前面加get 来获取getter方法
	 * 再通过调用这个方法来获取属性
	 *
	 * @return the checked
	 */
	public Boolean getIsChecked() {
		return isChecked;
	}

	/**
	 * Gets check id.
	 *
	 * @return the check id
	 */
	public Integer getCheckId() {
		return checkId;
	}

	/**
	 * Gets check time.
	 *
	 * @return the check time
	 */
	public Date getCheckTime() {
		return checkTime;
	}

	/**
	 * 取得id主键
	 *
	 * @return id
	 */
	public Long getId() {
		return this.id;
	}

	/**
	 * 取得吐槽内容
	 *
	 * @return message
	 */
	public String getMessage() {
		return this.message;
	}

	/**
	 * 取得提交时间
	 *
	 * @return posted time
	 */
	public Date getPostedTime() {
		return this.postedTime;
	}

	/**
	 * 取得吐槽者
	 *
	 * @return spitter
	 */
	public Spitter getSpitter() {
		return this.spitter;
	}

}
